package com.yy.student.entity;

import com.yy.common.entity.BaseEntity;
import com.yy.datatable.entity.DataTable;

import javax.persistence.*;


@Entity
@Table(name = "t_student")
public class StudentEntity extends BaseEntity {
    private String name;
    /**
     * 身份证号
     */
    @Column(unique = true)
    private String cardNo;
    @OneToOne(cascade = CascadeType.REFRESH,fetch = FetchType.EAGER)
    @JoinColumn(name = "data_table_key")
    private DataTable sex;

    private int age;

    private String currentAddress;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public DataTable getSex() {
        return sex;
    }

    public void setSex(DataTable sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCurrentAddress() {
        return currentAddress;
    }

    public void setCurrentAddress(String currentAddress) {
        this.currentAddress = currentAddress;
    }

}
